package org.mspring.mlog.dao.impl;

import org.mspring.mlog.dao.LogDao;
import org.mspring.mlog.entity.Log;
import org.mspring.platform.dao.hibernate.GenericDao;
import org.springframework.stereotype.Repository;

/**
 *
 * @author Gao Youbo
 * @since 2014-01-11
 */
@Repository
public class LogDaoImpl extends GenericDao<Log, Long> implements LogDao {

    @Override
    public void clear() {
        super.executeUpdate("delete Log log");
    }

    @Override
    public void clearBeforeTime(String date) {
        super.executeUpdate("delete Log log where log.actionTime < ?", date);
    }

}
